<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <link rel="stylesheet" th:href="@{../static/css/component.css}">
    <link rel="stylesheet" th:href="@{../static/css/admin.css}">
    <link rel="stylesheet" th:href="@{../static/css/font-awesome.min.css}">
    <script th:src="@{../static/js/JQuery2.1.4.js}"></script>
    <script th:src="@{../static/js/common.js}"></script>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="rbody" id="app">
    <div class="top">
        当前位置：后台<i class="fa fa-fw fa-angle-right"></i>用户列表
    </div>
    <div class="main">
        <div class="tabList">
            <span class="active">用户列表</span>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                用户查询
            </div>
            <div class="panel-body">
        <form id="peopleForm"  th:action="@{../user/queryusers}" method="post">
            输入账号
            <input type="text"  name="number" th:value="${number}">
            用户名
            <input type="text"  name="username" th:value="${username}">
            学院
            <input type="学院"  name="grade" th:text="${academy}" th:value="${academy}">
            <button type="submit" class="btn btn-default" >查询</button>
        </form>
            </div>
        </div>
        <div class="tableLists mrb10">
            <form th:action="@{/user/addadmin}" method="post">
            <table>
                <tr>
                    <th>用户ID</th>
                    <th>用户名</th>
                    <th>账号</th>
                    <th>学号</th>
                    <th>学院</th>
                    <th>性别</th>
                    <th>身份</th>
                    <th>角色</th>
                    <th>状态</th>
                    <th>选择更改类型</th>
                    <th>操作</th>
                </tr>
                <tr th:each="user:${page.records}">
                    <td><input  name="userId" th:value="${user.userId}" readonly="readonly" style="border: none ; outline: none"/></td>
                    <td th:text="${user.getUserName()}"></td>
                    <td th:text="${user.aNumber}"></td>
                    <td th:text="${user.number}"></td>
                    <td th:text="${user.academy}"></td>
                    <td th:text="${user.sex}"></td>
                    <td th:text="${user.identity}"></td>
                    <td th:text="${user.role}"></td>
                    <td th:text="${user.state}"></td>
                    <td><input type="radio" name="permission" value="1"/>场地管理员<input type="radio" name="permission"value="2"/>赛事管理员<input type="radio" name="permission"value="3"/>器材管理员</td>
                    <td>
                        <button type="submit" class="btn btn-default">确认</button>
                    </td>
                </tr>
            </table>
                <ul class="pagination">
                    <li><a th:href="@{../user/queryusers(pageNum=1,number=${number},username=${username},academy=${academy})}">首页</a></li>
                    <li> <a th:if="${page.current}!=1"
                           th:href="@{../user/../user/queryusers(pageNum=${page.current}-1,number=${number},username=${username},academy=${academy})}">上一页</a></li>
                    <li><a th:if="${page.current}!=${page.pages}"
                           th:href="@{../user/queryusers(pageNum=${page.current}+1,number=${number},username=${username},academy=${academy})}">下一页</a></li>
                    <li><a th:href="@{../user/queryusers(pageNum=${page.pages},number=${number},username=${username},academy=${academy})}">尾页</a></li>
                </ul>
            </form>
        </div>
    </div>
</div>
</body>
</html>